<template>
  <div>
    <basic-container>
      <div class="app-container">
        <el-form :model="queryParams" :rules="rules" ref="queryForm" size="small" :inline="true">
          <div>
            <el-form-item label="壳体码">
              <el-input v-model="queryParams.code" placeholder="请输入壳体码" style="width: 200px;"
               ></el-input>
            </el-form-item>
            <el-form-item label="泵盖码">
              <el-input v-model="queryParams.supplies" placeholder="请输入泵盖码" style="width: 200px;"
               ></el-input>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" icon="el-icon-check" size="mini" :disabled="!queryParams.code || !queryParams.supplies" @click="DefiniteMdification">确定</el-button>
            </el-form-item>
          </div>
        </el-form>
      </div>
    </basic-container>
  </div>
</template>

<script>
import { bindview } from "@/api/view2";

export default {
  data() {
    return {
      loading: false,
      titleLab: '',
      titleLabtwo: '',
      titleLabwhere: '',
      minNub: '',
      maxNub: '',
      maxTwo: '',
      maxthere: '',
      eidMaxnum: '',
      eidMinnum: '',
      title: "壳体总码绑定",
      queryParams: {

        code: '',
        supplies: ''
      },
      menuMessTwo: '',
      rules: {
        sn: [{ required: true, message: "壳体码不能为空", trigger: "blur" }],
        code: [{ required: true, message: "总码不能为空", trigger: "blur" }],
        grade: [{ required: true, message: "等级不能为空", trigger: "blur" }]
      }
    };
  },
  created() {

  },
  computed: {
    isDisabled() {
      return !this.queryParams.sn.trim() || !this.queryParams.code.trim() || !this.queryParams.grade.trim();
    },
    menudis() {
      return !this.menuMessTwo.trim();
    },

  },
  methods: {
    DefiniteMdification() {
      bindview(this.queryParams).then(res => {
        console.log(res);
        this.$message({
          message: "更新泵盖码成功",
          type: "success"
        });
        this.queryParams.code = '';
        this.queryParams.supplies = '';
      });
    },
  }
};
</script>

<style>
/* 添加你的样式 */
</style>